package com.hq.demo4;

public abstract class Factory {
    //定义了产品生产的流程
    public final Product create(String owner) {
        Product p = createProduct(owner);
        registerProduct(p);



        return p;
    }

    protected abstract Product createProduct(String owner);

    protected abstract void registerProduct(Product product);
}